package com.bruce.Common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author cc
 * @date 2021/7/23 18:57
 * @Description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public  class  Result {
    int code;
    String mes;
    Object data;

    public static Result succ(int code,String mes,Object data){
        Result result = new Result(code,mes,data);
        return result;
    }
    public static Result succ(Object data){
        return succ(Resultcode.System_success.getCode(),Resultcode.System_success.getMess(),data);
    }
    public static Result succ(String s){
        return succ(Resultcode.System_success.getCode(),Resultcode.System_success.getMess(),null);
    }
    public static Result succ( ){
        return succ(Resultcode.System_success.getCode(),Resultcode.System_success.getMess(),null);
    }
}
